package com.catdou.formatter.annotations;

import com.fasterxml.jackson.annotation.JacksonAnnotation;
import com.fasterxml.jackson.databind.JsonSerializer;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author James
 */
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotation
public @interface NullValueHandler {
    Class<? extends JsonSerializer> using() default JsonSerializer.None.class;

    /**
     * 忽略某些类型
     * @return
     */
    Class<?>[] ignore() default JsonSerializer.None.class;
}
